package com.lai.hospital.constant;

/**
 * @author : lai
 * @version V1.0
 * @Project: hospital-springboot
 * @Package com.lai.hospital.constant
 * @Description: Security常量
 * @date Date : 2022年11月16日 21:13
 */
public class SecurityConst {

    public static final String INSUFFICIENT_PRIVILEGES = "权限不足";

    public static final String LOGOUT_SUCCESS = "退出成功";

    public static final String TOKEN_EXPIRE = "token过期";

    public static final String TOKEN_FAILURE = "token失效";


    /**
     * rememberMe 为 false 的时候过期时间是1个小时
     */
    public static final long EXPIRATION = 60 * 60L;

    /**
     * rememberMe 为 true 的时候过期时间是7天
     */
    public static final long EXPIRATION_REMEMBER = 60 * 60 * 24 * 7L;

    // JWT token defaults
    public static final String TOKEN_HEADER = "Authorization";
    public static final String TOKEN_PREFIX = "Bearer ";
    public static final String TOKEN_TYPE = "JWT";
    public static final String TOKEN_ALG = "HS256";

    // Swagger WHITELIST
    public static final String[] WHITELIST = {
            "/login",
            "/admin/user/menus",
            "/user/register",
            "/swagger-ui.html",
            "/swagger-ui/*",
            "/swagger-resources/**",
            "/v2/api-docs",
            "/v3/api-docs",
            "/webjars/**",
            //knife4j
            "/doc.html",
    };


}
